<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<!--    用于解析ES6-->
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
    <style>
        .red {
            color: red;
        }
    </style>
</head>
<!--ES6 -->
<!--props传值-->
<body>
    <div id="app"></div>
    <script type="text/babel">
        function Template(props){
            // 组件接收值
            return <div>
                <h1>无状态组件</h1>
                <p>姓名{props.name}</p>
                <p>年龄{props.age}</p>
                <p>xxxx</p>
            </div>
        }
        // 这里传值
        ReactDOM.render(<Template name="aa" age="10"/>, document.getElementById('app'))

    </script>
</body>
</html>